




-------------------------------------------------------------------------------
-- 祈禳AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__qirang", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__qirang", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 羽化AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__yuhua", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__yuhua", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 竭缘AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__jieyuan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__jieyuan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 焚心AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__fenxin", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__fenxin", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})






-------------------------------------------------------------------------------
-- 征南AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__zhengnan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__zhengnan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 反戈AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__fange", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshujl__fange", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 寻猎AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__xunlie", {
  -- 确保发动技能
  think_skill_invoke = function(self, ai, skill_name, prompt)
    -- 判断当前回合角色是敌是友
    local current = ai.room:getCurrent()
    -- 如果不能确定当前回合角色，默认发动
    if not current then return true end
    
    -- 友方触发，敌方不触发
    return ai:isFriend(current)
  end,

  think_choose = function(self, ai, choices, data)
    if not table.contains(choices, "回复一点体力并摸两张牌") or 
       not table.contains(choices, "受到一点伤害并随机弃置两张牌") then
      return choices[1]
    end
    
    -- 直接返回回复选项，因为只有友方才会触发技能
    return "回复一点体力并摸两张牌"
  end,
})





-------------------------------------------------------------------------------
-- 绝境AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__juejing", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__juejing", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 龙魂AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__longhun", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__longhun", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 瑰杀AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__guisha", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshujl__guisha", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})

-------------------------------------------------------------------------------
-- 姝丽AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__shuli", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshujl__shuli", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 芳魂AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__fanghun", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__fanghun", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})

-------------------------------------------------------------------------------
-- 扶汉AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__fuhan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__fuhan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 武魂AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__wuhun", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__wuhun", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 缮甲AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__shanjia", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__shanjia", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 骁锐AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__xiaorui", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__xiaorui", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 定乱AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__xinghan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__xinghan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})












-------------------------------------------------------------------------------
-- 踏阵AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__tazheng", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshujl__tazheng", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 创世 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__chuangshi", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshujl__chuangshi", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})





-------------------------------------------------------------------------------
-- 灭世AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshujl__mieshi", {
  -- 直接发动技能
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true
  end,

  -- 选择目标
  think_choose_players = function(self, ai, players, min_num, max_num, prompt)
    if not prompt:startsWith("灭世：选择其中一个目标") then return {} end
    if #players == 0 then return {} end
    -- 直接选第一个目标
    return {players[1]}
  end,

  -- 选择操作方式
  think_choose = function(self, ai, choices, data)
    -- 优先选择禁用手牌
    if table.contains(choices, "禁用手牌") then
      return "禁用手牌"
    end
    -- 其次选择技能失效
    return "技能失效"
  end,

  -- 选择要失效的技能
  think_choose_mark_skill = function(self, ai, skills, min_num, max_num, data)
    if #skills == 0 then return {} end
    -- 直接选前两个技能
    return table.slice(skills, 1, math.min(2, #skills))
  end,
})

-- 伤害触发部分
SmartAI:setSkillAI("#tshujl__mieshi_trigger", {
  -- 直接发动技能
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true
  end,
})


-------------------------------------------------------------------------------
-- 帝师 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__dishi", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__dishi", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 洛神 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__luoshen", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__luoshen", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 反戈 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__fange", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__fange", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 饕怨 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__taoyuan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__taoyuan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 撕咬 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__siyao", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__siyao", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 贪食 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__tanshi", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__tanshi", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 兽袭 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__shouxi", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__shouxi", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})





-------------------------------------------------------------------------------
-- 巳蛇 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__sishe", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__sishe", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 申猴 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__shenhou", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__shenhou", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 子鼠AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__zishu", {
  think = function(self, ai)
    local player = ai.player
    -- 获取所有手牌数大于自己的角色
    local targets = table.filter(ai.room:getOtherPlayers(player), function(p)
      return p:getHandcardNum() > player:getHandcardNum()
    end)
    
    -- 计算对每个目标使用技能的收益
    local benefits = table.map(targets, function(p)
      return { p.id, ai:getBenefitOfEvents(function(logic)
        -- 模拟获得一张牌的收益
        logic:obtainCard(player.id, p:getCardIds("h")[1], false, fk.ReasonPrey)
      end)}
    end)
    
    -- 选择收益最高的目标
    table.sort(benefits, function(a, b) return a[2] > b[2] end)
    if #benefits == 0 or benefits[1][2] <= 0 then return {} end
    
    return { targets = {benefits[1][1]} }, benefits[1][2]
  end,

  -- 选择要获得的牌的目标
  think_choose_players = function(self, ai, players, min_num, max_num, prompt)
    if prompt ~= "#tshu__zishu-choose" then return {} end
    if #players == 0 then return {} end
    
    -- 优先选择敌方
    for _, pid in ipairs(players) do
      local p = ai.room:getPlayerById(pid)
      if p and ai:isEnemy(p) then
        return {pid}
      end
    end
    
    -- 实在没有就选第一个
    return {players[1]}
  end,
})




-------------------------------------------------------------------------------
-- 伏间AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__fujian", {
  think = function(self, ai)
    local targets = ai.room:getOtherPlayers(ai.player)
    if #targets == 0 then return {} end
    
    -- 优先选择有手牌的敌人
    for _, p in ipairs(targets) do
      if not p:isKongcheng() and ai:isEnemy(p) then
        return { targets = {p.id} }, 100
      end
    end
    
    -- 其次选择任意有手牌的角色
    for _, p in ipairs(targets) do
      if not p:isKongcheng() then
        return { targets = {p.id} }, 50
      end
    end
    
    return {}
  end,

  -- 选择要获得的牌，只选一张
  think_choose_cards = function(self, ai, cards, min_num, max_num, data)
    if #cards == 0 then return {} end
    -- 只选第一张牌
    return {cards[1]}
  end,
})



-------------------------------------------------------------------------------
-- 琴音AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__qinyin", {
  think = function(self, ai)
    local targets = {}
    local player = ai.player
    
    -- 优先选择受伤的友方和血量高的敌人
    for _, p in ipairs(ai.room.alive_players) do
      if #targets >= 2 then break end
      
      if ai:isFriend(p) and p:isWounded() then
        table.insert(targets, p.id)
      elseif ai:isEnemy(p) and p.hp > 1 then
        table.insert(targets, p.id)
      end
    end
    
    if #targets == 0 then return {} end
    return { targets = targets }, 100
  end,

  -- 选择效果
  think_choose = function(self, ai, choices, data)
    local target = ai.room:getPlayerById(data[2])
    if ai:isFriend(target) and table.contains(choices, "回复体力") then
      return "回复体力"
    end
    return "失去体力"
  end,
})

-------------------------------------------------------------------------------
-- 业炎AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__yeyan", {
  think = function(self, ai)
    local targets = {}
    
    -- 优先选择血量较高的敌人
    for _, p in ipairs(ai.room.alive_players) do
      if #targets >= 2 then break end
      if ai:isEnemy(p) and p.hp > 1 then
        table.insert(targets, p.id)
      end
    end
    
    if #targets == 0 then return {} end
    return { targets = targets }, 100
  end,
})




-------------------------------------------------------------------------------
-- 逐寇 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__zhukou", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__zhukou", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 氓情AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__mengqing", {
  -- 选择效果
  think_choose = function(self, ai, choices, data)
    -- 如果没有选项了就取消
    if #choices == 0 or table.contains(choices, "Cancel") then return "Cancel" end
    
    -- 优先选择造成伤害
    if table.contains(choices, "tshu__yuyun1") then
      return "tshu__yuyun1"
    end
    
    -- 其次选择多出杀
    if table.contains(choices, "tshu__yuyun3") then
      return "tshu__yuyun3"
    end
    
    -- 再次选择摸牌
    if table.contains(choices, "tshu__yuyun2") then
      return "tshu__yuyun2"
    end
    
    -- 最后选择手牌上限
    if table.contains(choices, "tshu__yuyun4") then
      return "tshu__yuyun4"
    end
    
    return choices[1]
  end,

  -- 选择造成伤害的目标
  think_choose_players = function(self, ai, players, min_num, max_num, prompt)
    if prompt ~= "氓情：选择一名角色对其造成2点伤害。" then return {} end
    if #players == 0 then return {} end
    
    -- 优先选择血量较高的敌人
    for _, pid in ipairs(players) do
      local p = ai.room:getPlayerById(pid)
      if p and ai:isEnemy(p) and p.hp > 2 then
        return {pid}
      end
    end
    
    -- 其次选择任意敌人
    for _, pid in ipairs(players) do
      local p = ai.room:getPlayerById(pid)
      if p and ai:isEnemy(p) then
        return {pid}
      end
    end
    
    -- 实在没有就选第一个
    return {players[1]}
  end,
})







-------------------------------------------------------------------------------
-- 奸雄 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("ex__jianxiong", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("ex__jianxiong", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 行殇 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("xingshang", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("xingshang", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})
















-------------------------------------------------------------------------------
-- 姝丽 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__shuli", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__shuli", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 美酿 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__meiniang", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__meiniang", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})




-------------------------------------------------------------------------------
-- 媱丽 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__yaoli", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__yaoli", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})



-------------------------------------------------------------------------------
-- 桃宴 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__taoyan", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
  
  -- 选择获得桃的角色
  think_choose_players = function(self, ai, players, min_num, max_num, prompt)
    if prompt ~= "#tshu__taoyan" then return {} end
    
    local targets = {}
    
    -- 所有可选角色已经是主忠了，直接排序选择体力低的
    local sortedPlayers = table.simpleClone(players)
    table.sort(sortedPlayers, function(a, b)
      local pa = ai.room:getPlayerById(a)
      local pb = ai.room:getPlayerById(b)
      return pa.hp < pb.hp
    end)
    
    -- 最多选择2名角色
    local count = math.min(2, #sortedPlayers)
    for i = 1, count do
      table.insert(targets, sortedPlayers[i])
    end
    
    return targets
  end,
})

SmartAI:setTriggerSkillAI("tshu__taoyan", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})


-------------------------------------------------------------------------------
-- 妍丽 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__yanli", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__yanli", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})





-------------------------------------------------------------------------------
-- 娴丽 AI配置
-------------------------------------------------------------------------------
SmartAI:setSkillAI("tshu__xianli", {
  think_skill_invoke = function(self, ai, skill_name, prompt)
    return true  -- 始终发动
  end,
})

SmartAI:setTriggerSkillAI("tshu__xianli", {
  correct_func = function(self, logic, event, target, player, data)
    if event == fk.TargetSpecified then
      logic.benefit = logic.benefit + 100
    end
  end,
})






return {}